#ifndef _STATICMODEL_HPP_
#define _STATICMODEL_HPP_

#include <vector>
#include <string>

#include "Material.hpp"
#include "CollisionModel.hpp"


struct Submesh
{
	int32_t Index;///<the indicies index, from where this submodel starts

	//TODO add some material class
	Material Mat;
};


class StaticModel
{
public:
	StaticModel();
	~StaticModel();
	void Load(std::string Filename);
	void RenderModel();

	std::string GetFilename() {return m_Filename;};

	CollisionModel CalculateCollisionBox();
private:
	void SaveToBinary(std::string Filename);
	void LoadFromBinary(std::string Filename);
	std::string m_Filename;

	//MeshData
	int m_IndexCount;
	std::vector<float> m_Positions;
	std::vector<float> m_Normals;
	std::vector<float> m_UVs;
	std::vector<uint32_t> m_Indices;

	std::vector<Submesh> m_Submeshs;
};
#endif
